#ifndef __ming_fyp_GuiManager_h__
#define __ming_fyp_GuiManager_h__

//------------------------------------------------------------------------------
// header includes
#include <map>
#include <windows.h>

#include "fyp/core/String.h"

class CDXUTDialog;
class CDXUTDialogResourceManager;

struct IDirect3DDevice9;

//------------------------------------------------------------------------------
namespace ming
{
namespace fyp
{
	//--------------------------------------------------------------------------
	class TGuiManager
	{
	public:
		//------------------------------
		// #cstor & #dstor
		TGuiManager(IDirect3DDevice9 *device);
		~TGuiManager();
		
		//------------------------------
		// external operations
		void Add(const TStr &name);
		CDXUTDialog* Get(const TStr &name);
		void Remove(const TStr &name);

		void Clear();

		void Render(float dt);

		void HandleWindowEvent(
			HWND hWnd,
			UINT uMsg,
			WPARAM wParam,
			LPARAM lParam,
			bool* pbNoFurtherProcessing);

		void ReloadResouces();

		bool IsVisible();
		void SetVisible(bool value);
		
	private:
		//------------------------------
		// internal attributes
		typedef std::map<TStr, CDXUTDialog*> DialogMap_t;
		DialogMap_t mDlgs;

		CDXUTDialogResourceManager *mDlgResMgr;

		bool mGuiVisible;
		
		//------------------------------
		// internal operations
	};
	
	//--------------------------------------------------------------------------
}
}


#endif	//__ming_fyp_GuiManager_h__